<!DOCTYPE HTML>
<html>
<head>
	<?php
		include("include.php");
		
		// get the current date
		$date = ourDate::getDateString();
		
		//get 6 upcoming events for the front page
		$upcomingEvents = eventHelper::getUpcomingEvents(6);
	?>
</head>
<body>


<div class="container">
	<div id="header">
		<!-- include the banner - displays the logo -->
		<?php include 'banner.php'; ?>
       

		<div id="login">
			<?php login::displayLoginDiv(); ?>
		</div>
		
		<div class="clear"></div>
		
		<div id="navigation">
			<?php include('navigation.php'); ?>
		</div>
	</div>
	
	<div class="clear"></div>
	
	<div id="body">
		<div id="content">
		
			<!-- ---------------------------------------------------------
				Upcoming event loop, just displays 6 upcomming events
			----------------------------------------------------------- -->
			<h1>Upcoming Events</h1>
			<?php 
			foreach($upcomingEvents as $key => $event)
			{
			?>
				<div class="event">
					<div class="image">
						<img src="<?php echo $event['image_path']; ?>" />
					</div>
					<div class="text">
						<h2>
						
						<a href="event.php?eventID=<?php echo $event['id'];?>"><?php echo $event['name']; ?></a>
			
						</h2>
		
						<p>Location: <?php echo $event['location']; ?></p>
						<p>When: <?php echo ourDate::formatDate($event['start_time']); ?></p>
						<p>Description: <?php echo substr($event['description'], 0, 100)." . . ."; ?></p>
					</div>
				</div>
				
				<div class="clear"></div>
			<?php 
			}
			?>
		</div>
		
		<!-- -------------------------------------------------------------
			This is the tag cloud on the right side of the page
		-------------------------------------------------------------  -->
		<div id="tags">
			<h1>Tags</h1>
			<?php tag::displayTagCloud(); ?>
		</div>
		
		<div id="fblike">
			<?php include "facebookLike.php"; ?>
        </div>
	
	</div>
	
	<div class="clear"></div>
	
	
	<!-- ------------------------------------
		footer at the bottom of the page
	-------------------------------------- -->
	<div id="footer">
		<?php include("footer.php"); ?>
	</div>

</div>


</body>
</html>